package jdbc;

/**
 * Created with IntelliJ IDEA.
 * Description:
 *
 * @author lzy
 * @create 2018-07-30 下午3:00
 *
 * 在JavaEE中，Java类的属性通过getter,setter来定义，get(或set)方法，去除get(或set)后，首字母小写
 * 即为Java类的属性
 * 而以前叫的那个属性，即成员变量，称之为字段
 * 操作Java类的属性有一个工具包:beanUtils
 * 设置属性：BeanUtils.setProperty(object, propertyName, propertyValue)
 * 获取属性: BeanUtils.getProperty(object, propertyName)
 */
public class Customer {
    private int id;
    private String name;
    private String email;
    private String birth;

    public Customer() {
    }

    public Customer(int id, String name, String email, String birth) {
        this.id = id;
        this.name = name;
        this.email = email;
        this.birth = birth;
    }

    @Override
    public String toString() {
        return "Customer{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", email='" + email + '\'' +
                ", birth='" + birth + '\'' +
                '}';
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }
}
